package com.jit.app.listener;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;

import com.alibaba.fastjson.JSONObject;
import com.jit.app.AppDetailActivity;

public class AppListItemClickListener implements AdapterView.OnItemClickListener {

    Context context;

    public AppListItemClickListener(Context context) {
        this.context = context;
    }

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        Intent intent = new Intent(context, AppDetailActivity.class);
        intent.putExtra("appInfo",(JSONObject)parent.getItemAtPosition(position));
        context.startActivity(intent);

    }
}
